using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;

public class GameManager : MonoBehaviour
{
    public static GameManager Instance;

    private PlayableDirector maindirector;
    // Start is called before the first frame update
    void Awake()
    {
        Instance = this;
    }

    public void PauseGame(PlayableDirector _director)
    {
        maindirector = _director;
        maindirector.playableGraph.GetRootPlayable(0).SetSpeed(0d);
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            maindirector.playableGraph.GetRootPlayable(0).SetSpeed(1d);
        }
    }
}
